import request from '@/utils/request'

// 根据患者流水号查询监测信息
export function getmonitorOneInfo(medicalRecordNo) {
  return request({
    url: `/workstation/monitorOneInfo/medicalRecordNo/${medicalRecordNo}`,
    method: 'get',
  })
}

// 检测表流水号是否存在
export function exist(monitorRecordNo) {
  return request({
    url: `/workstation/monitorOneInfo/exist/${monitorRecordNo}`,
    method: 'get',
  })
}


// 保存电子监测管理信息
export function addmonitorOneInfo(data) {
  return request({
    url: '/workstation/monitorOneInfo',
    method: 'post',
    data: data
  })
}

// 查询电子监测管理信息列表
export function listManagerInfo(query) {
  return request({
    url: '/workstation/managerInfo/list',
    method: 'get',
    params: query
  })
}

// 查询电子监测管理信息详细
export function getManagerInfo(id) {
  return request({
    url: '/workstation/managerInfo/' + id,
    method: 'get'
  })
}

// 查询电子监测bbbb管理信息详细
export function getManagerInfoB(id) {
  return request({
    url: '/workstation/managerInfo/b/' + id,
    method: 'get'
  })
}

// 新增电子监测管理信息
export function addManagerInfo(data) {
  return request({
    url: '/workstation/managerInfo',
    method: 'post',
    data: data
  })
}

// 修改电子监测管理信息
export function updateManagerInfo(data) {
  return request({
    url: '/workstation/managerInfo',
    method: 'put',
    data: data
  })
}

// 删除电子监测管理信息
export function delManagerInfo(id) {
  return request({
    url: '/workstation/managerInfo/' + id,
    method: 'delete'
  })
}


// 删除电子监测管理信息
export function delManagerInfoB(id) {
  return request({
    url: '/workstation/managerInfo/b/' + id,
    method: 'delete'
  })
}

// 根据患者流水号查询监测信息B表
export function getBBBBmonitorOneInfo(medicalRecordNo) {
  return request({
    url: `/workstation/monitorTwoInfo/medicalRecordNo/${medicalRecordNo}`,
    method: 'get',
  })
}

// 保存电子监测管理信息B表
export function addBBBBmonitorOneInfo(data) {
  return request({
    url: '/workstation/monitorTwoInfo',
    method: 'post',
    data: data
  })
}
// 检测BBBBBBBB表流水号是否存在
export function existBBBBBB(monitorRecordNo) {
  return request({
    url: `/workstation/monitorTwoInfo/exist/${monitorRecordNo}`,
    method: 'get',
  })
}

// 根据id查询A表
export function monitorOneInfoIDAAA(id) {
  return request({
    url: `/workstation/monitorOneInfo/${id}`,
    method: 'get',
  })
}
// 根据id查询b表
export function monitorTwoInfoIDBBB(id) {
  return request({
    url: `/workstation/monitorTwoInfo/${id}`,
    method: 'get',
  })
}
// 驳回
export function reject(id,reason) {
  return request({
    url: `/workstation/monitorOneInfo/reject/${id}/${reason}`,
    method: 'get',
  })
}

// 驳回
export function rejectAAAA(data) {
  return request({
    url: `/workstation/monitorOneInfo/reject`,
    method: 'put',
    data,
  })
}

// 驳回BBBB
export function rejectBBBB(data) {
  return request({
    url: `/workstation/monitorTwoInfo/reject`,
    method: 'put',
    data,
  })
}
// 根据药历号查询续一信息
export function GETmedicalRecordNo(medicalRecordNo) {
  return request({
    url: `/workstation/extendOneInfo/list/${medicalRecordNo}`,
    method: 'get',
  })
}